package com.future.permission.config;

import com.alibaba.druid.DbType;
import com.alibaba.druid.filter.stat.StatFilter;
import com.alibaba.druid.wall.WallFilter;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @Author yinhao
 * @Date 2021/3/30 17:01
 * @Description
 */
@Configuration
public class DruidFilterConfig {

//    @Bean
//    public StatFilter statFilter() {
//        StatFilter statFilter = new StatFilter();
//        statFilter.setLogSlowSql(true);
//        statFilter.setMergeSql(true);
//        return statFilter;
//    }

    @Bean
    public WallFilter wallFilter() {
        WallFilter wallFilter = new WallFilter();
        wallFilter.setDbType(DbType.mysql);
        return wallFilter;
    }

}
